﻿using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Globalization;
using System.Data;
using System.Data.Common;
using System.Xml;
using System.Text;
using LibHuman;

namespace Human
{
	/// <summary>
	/// Summary description for frmCongTacSua.
	/// </summary>
	public class frmCongTac : System.Windows.Forms.Form
	{
		private string TSo="",m_user="",sql="";				
		private AccessData mDB=new AccessData();
        Language lan = new Language();
		public DataSet ds =new DataSet();
        bool admin = false;
        int flag = 0;
		private DataSet ds1=new DataSet();
        private string v_manv, v_ho, v_bophan,ten_nd="";
		private System.Windows.Forms.GroupBox groupCT;
		private System.Windows.Forms.Button cmdLuu_CT;
		private System.Windows.Forms.TextBox txtHS_CT;
        private System.Windows.Forms.TextBox txtDV_CT;
		private System.Windows.Forms.Label label168;
		private System.Windows.Forms.Label label167;
		private System.Windows.Forms.Label label166;
		private System.Windows.Forms.Label label165;
		private System.Windows.Forms.Label label164;
        private System.Windows.Forms.Label label163;
		private System.Windows.Forms.TextBox txtKyNang;
		private System.Windows.Forms.TextBox txtSoThich;
		private System.Windows.Forms.CheckBox ckbKyNang;
		private System.Windows.Forms.CheckBox ckbSoThich;
		private System.Windows.Forms.TextBox txtTSo;
		private System.Windows.Forms.Label label27;
		private System.Windows.Forms.Panel panButLyLich;
		private System.Windows.Forms.Button btn_luu;
		private System.Windows.Forms.Button butHuy;
		private System.Windows.Forms.Button btn_thoat;
        private MaskedBox.MaskedBox dtpNgayCongTac;
        private System.Windows.Forms.ToolTip toolTip1;
        private MaskedTextBox txtDN_CT;
        private MaskedTextBox txtTN_CT;
        private DataGridView dgrThanhVienGD;
        private Panel panCongTac;
        private Label lblTenPhongCT;
        private Label lblHoTenNVCT;
        private Label label29;
        private Label lblMasoNVCT;
        private Label label28;
        private ContextMenuStrip contextMenuStrip1;
        private ToolStripMenuItem thêmToolStripMenuItem;
        private ToolStripMenuItem hủyToolStripMenuItem;
        private Label label1;
        private TextBox txtId;
        private Button btnthem;
        private ComboBox cbchucvu;
        private ComboBox cbngenghiep;
        private Button btn_sua;
        private Button btn_boqua;
        private TextBox txt_dennam;
        private Label label3;
        private Label label2;
        private TextBox txt_tunam;
        private Panel panel2;
        private Button button7;
        private Button button8;
        private Button button9;
        private Button button10;
        private Button button11;
        private Button button12;
        private CheckBox checkBox2;
        private TextBox textBox2;
        private Panel panel1;
        private Button button1;
        private Button button2;
        private Button button3;
        private Button button4;
        private Button button5;
        private Button button6;
        private TextBox txt_tuthang;
        private Label label6;
        private TextBox txt_denthang;
        private Label label5;
        private TextBox txt_hsk;
        private Label label8;
        private TextBox txt_hsud;
        private Label label7;
        private TextBox txt_hsvk;
        private Label label4;
        private GroupBox groupBox1;
        private TextBox txt_hscv;
        private Label label9;
        private DataGridViewTextBoxColumn ngayhl;
        private DataGridViewTextBoxColumn tunam;
        private DataGridViewTextBoxColumn denngay;
        private DataGridViewTextBoxColumn dennam;
        private DataGridViewTextBoxColumn Column1_5;
        private DataGridViewTextBoxColumn Column1_7;
        private DataGridViewTextBoxColumn Column1_8;
        private DataGridViewTextBoxColumn mad;
        private DataGridViewTextBoxColumn id;
        private CheckBox chk_dict;
		private System.ComponentModel.IContainer components;
        //private string n_chucvu = "", n_nghenghiep = "";

		public frmCongTac(string manv,string hoten,string madv,string chucvu,string nghenghiep,bool m_admin,string tennd)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();
            lan.Read_Language_to_Xml(this.Name.ToString(), this);
            lan.Changelanguage_to_English(this.Name.ToString(), this);
            if (Screen.PrimaryScreen.WorkingArea.Width >= 1000)//
            {
                this.WindowState = FormWindowState.Normal;
                //              this.MaximizeBox = false;
            }
            else
            {
                //this.BackgroundImage = lbl800.Image;
                this.WindowState = FormWindowState.Maximized;
            }
			lblMasoNVCT.Text=manv;
			lblHoTenNVCT.Text=hoten;
			lblTenPhongCT.Text=madv;
            admin = m_admin;
            ten_nd = tennd;
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmCongTac));
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
            this.groupCT = new System.Windows.Forms.GroupBox();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.txt_hscv = new System.Windows.Forms.TextBox();
            this.label9 = new System.Windows.Forms.Label();
            this.txt_hsk = new System.Windows.Forms.TextBox();
            this.label8 = new System.Windows.Forms.Label();
            this.label168 = new System.Windows.Forms.Label();
            this.txtHS_CT = new System.Windows.Forms.TextBox();
            this.txt_hsvk = new System.Windows.Forms.TextBox();
            this.label4 = new System.Windows.Forms.Label();
            this.txt_hsud = new System.Windows.Forms.TextBox();
            this.label7 = new System.Windows.Forms.Label();
            this.label6 = new System.Windows.Forms.Label();
            this.txt_denthang = new System.Windows.Forms.TextBox();
            this.label5 = new System.Windows.Forms.Label();
            this.txt_dennam = new System.Windows.Forms.TextBox();
            this.cbngenghiep = new System.Windows.Forms.ComboBox();
            this.label3 = new System.Windows.Forms.Label();
            this.txtDN_CT = new System.Windows.Forms.MaskedTextBox();
            this.label2 = new System.Windows.Forms.Label();
            this.txt_tuthang = new System.Windows.Forms.TextBox();
            this.txt_tunam = new System.Windows.Forms.TextBox();
            this.txtTN_CT = new System.Windows.Forms.MaskedTextBox();
            this.txtDV_CT = new System.Windows.Forms.TextBox();
            this.label167 = new System.Windows.Forms.Label();
            this.label166 = new System.Windows.Forms.Label();
            this.cbchucvu = new System.Windows.Forms.ComboBox();
            this.label165 = new System.Windows.Forms.Label();
            this.label164 = new System.Windows.Forms.Label();
            this.label163 = new System.Windows.Forms.Label();
            this.cmdLuu_CT = new System.Windows.Forms.Button();
            this.txtKyNang = new System.Windows.Forms.TextBox();
            this.txtSoThich = new System.Windows.Forms.TextBox();
            this.ckbKyNang = new System.Windows.Forms.CheckBox();
            this.ckbSoThich = new System.Windows.Forms.CheckBox();
            this.txtTSo = new System.Windows.Forms.TextBox();
            this.label27 = new System.Windows.Forms.Label();
            this.panButLyLich = new System.Windows.Forms.Panel();
            this.btn_boqua = new System.Windows.Forms.Button();
            this.btn_sua = new System.Windows.Forms.Button();
            this.btnthem = new System.Windows.Forms.Button();
            this.btn_luu = new System.Windows.Forms.Button();
            this.butHuy = new System.Windows.Forms.Button();
            this.btn_thoat = new System.Windows.Forms.Button();
            this.panel2 = new System.Windows.Forms.Panel();
            this.button7 = new System.Windows.Forms.Button();
            this.button8 = new System.Windows.Forms.Button();
            this.button9 = new System.Windows.Forms.Button();
            this.button10 = new System.Windows.Forms.Button();
            this.button11 = new System.Windows.Forms.Button();
            this.button12 = new System.Windows.Forms.Button();
            this.checkBox2 = new System.Windows.Forms.CheckBox();
            this.textBox2 = new System.Windows.Forms.TextBox();
            this.dtpNgayCongTac = new MaskedBox.MaskedBox();
            this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
            this.dgrThanhVienGD = new System.Windows.Forms.DataGridView();
            this.ngayhl = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.tunam = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.denngay = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.dennam = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column1_5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column1_7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column1_8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.mad = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.id = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
            this.thêmToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.hủyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.panCongTac = new System.Windows.Forms.Panel();
            this.label1 = new System.Windows.Forms.Label();
            this.lblTenPhongCT = new System.Windows.Forms.Label();
            this.lblHoTenNVCT = new System.Windows.Forms.Label();
            this.label29 = new System.Windows.Forms.Label();
            this.lblMasoNVCT = new System.Windows.Forms.Label();
            this.label28 = new System.Windows.Forms.Label();
            this.txtId = new System.Windows.Forms.TextBox();
            this.panel1 = new System.Windows.Forms.Panel();
            this.button1 = new System.Windows.Forms.Button();
            this.button2 = new System.Windows.Forms.Button();
            this.button3 = new System.Windows.Forms.Button();
            this.button4 = new System.Windows.Forms.Button();
            this.button5 = new System.Windows.Forms.Button();
            this.button6 = new System.Windows.Forms.Button();
            this.chk_dict = new System.Windows.Forms.CheckBox();
            this.groupCT.SuspendLayout();
            this.groupBox1.SuspendLayout();
            this.panButLyLich.SuspendLayout();
            this.panel2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dgrThanhVienGD)).BeginInit();
            this.contextMenuStrip1.SuspendLayout();
            this.panCongTac.SuspendLayout();
            this.panel1.SuspendLayout();
            this.SuspendLayout();
            // 
            // groupCT
            // 
            this.groupCT.Controls.Add(this.chk_dict);
            this.groupCT.Controls.Add(this.groupBox1);
            this.groupCT.Controls.Add(this.label6);
            this.groupCT.Controls.Add(this.txt_denthang);
            this.groupCT.Controls.Add(this.label5);
            this.groupCT.Controls.Add(this.txt_dennam);
            this.groupCT.Controls.Add(this.cbngenghiep);
            this.groupCT.Controls.Add(this.label3);
            this.groupCT.Controls.Add(this.txtDN_CT);
            this.groupCT.Controls.Add(this.label2);
            this.groupCT.Controls.Add(this.txt_tuthang);
            this.groupCT.Controls.Add(this.txt_tunam);
            this.groupCT.Controls.Add(this.txtTN_CT);
            this.groupCT.Controls.Add(this.txtDV_CT);
            this.groupCT.Controls.Add(this.label167);
            this.groupCT.Controls.Add(this.label166);
            this.groupCT.Controls.Add(this.cbchucvu);
            this.groupCT.Controls.Add(this.label165);
            this.groupCT.Controls.Add(this.label164);
            this.groupCT.Controls.Add(this.label163);
            this.groupCT.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.groupCT.ForeColor = System.Drawing.Color.Blue;
            this.groupCT.Location = new System.Drawing.Point(4, 264);
            this.groupCT.Name = "groupCT";
            this.groupCT.Size = new System.Drawing.Size(820, 92);
            this.groupCT.TabIndex = 10;
            this.groupCT.TabStop = false;
            this.groupCT.Text = "Quá Trình Công Tác";
            // 
            // groupBox1
            // 
            this.groupBox1.Controls.Add(this.txt_hscv);
            this.groupBox1.Controls.Add(this.label9);
            this.groupBox1.Controls.Add(this.txt_hsk);
            this.groupBox1.Controls.Add(this.label8);
            this.groupBox1.Controls.Add(this.label168);
            this.groupBox1.Controls.Add(this.txtHS_CT);
            this.groupBox1.Controls.Add(this.txt_hsvk);
            this.groupBox1.Controls.Add(this.label4);
            this.groupBox1.Controls.Add(this.txt_hsud);
            this.groupBox1.Controls.Add(this.label7);
            this.groupBox1.Location = new System.Drawing.Point(9, 57);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(540, 34);
            this.groupBox1.TabIndex = 119;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "Hệ số:";
            // 
            // txt_hscv
            // 
            this.txt_hscv.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_hscv.Location = new System.Drawing.Point(391, 9);
            this.txt_hscv.MaxLength = 5;
            this.txt_hscv.Name = "txt_hscv";
            this.txt_hscv.Size = new System.Drawing.Size(45, 22);
            this.txt_hscv.TabIndex = 12;
            this.txt_hscv.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_hscv_KeyPress);
            this.txt_hscv.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_hscv_KeyDown);
            // 
            // label9
            // 
            this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label9.ForeColor = System.Drawing.Color.DarkBlue;
            this.label9.Location = new System.Drawing.Point(344, 14);
            this.label9.Name = "label9";
            this.label9.Size = new System.Drawing.Size(47, 13);
            this.label9.TabIndex = 126;
            this.label9.Text = "Chức vụ";
            this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txt_hsk
            // 
            this.txt_hsk.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_hsk.Location = new System.Drawing.Point(487, 9);
            this.txt_hsk.MaxLength = 5;
            this.txt_hsk.Name = "txt_hsk";
            this.txt_hsk.Size = new System.Drawing.Size(45, 22);
            this.txt_hsk.TabIndex = 13;
            this.txt_hsk.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_hsk_KeyPress);
            this.txt_hsk.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_hsk_KeyDown);
            // 
            // label8
            // 
            this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label8.ForeColor = System.Drawing.Color.DarkBlue;
            this.label8.Location = new System.Drawing.Point(449, 14);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(32, 13);
            this.label8.TabIndex = 124;
            this.label8.Text = "Khác";
            this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label168
            // 
            this.label168.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label168.ForeColor = System.Drawing.Color.DarkBlue;
            this.label168.Location = new System.Drawing.Point(4, 14);
            this.label168.Name = "label168";
            this.label168.Size = new System.Drawing.Size(37, 13);
            this.label168.TabIndex = 55;
            this.label168.Text = "Lương";
            this.label168.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txtHS_CT
            // 
            this.txtHS_CT.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtHS_CT.Location = new System.Drawing.Point(53, 9);
            this.txtHS_CT.MaxLength = 5;
            this.txtHS_CT.Name = "txtHS_CT";
            this.txtHS_CT.Size = new System.Drawing.Size(45, 22);
            this.txtHS_CT.TabIndex = 9;
            this.txtHS_CT.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtHS_CT_KeyPress);
            this.txtHS_CT.Validated += new System.EventHandler(this.txtHS_CT_Validated);
            this.txtHS_CT.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtHS_CT_KeyDown);
            // 
            // txt_hsvk
            // 
            this.txt_hsvk.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_hsvk.Location = new System.Drawing.Point(171, 9);
            this.txt_hsvk.MaxLength = 5;
            this.txt_hsvk.Name = "txt_hsvk";
            this.txt_hsvk.Size = new System.Drawing.Size(45, 22);
            this.txt_hsvk.TabIndex = 10;
            this.txt_hsvk.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_hsvk_KeyPress);
            this.txt_hsvk.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_hsvk_KeyDown);
            // 
            // label4
            // 
            this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label4.ForeColor = System.Drawing.Color.DarkBlue;
            this.label4.Location = new System.Drawing.Point(101, 14);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(62, 13);
            this.label4.TabIndex = 120;
            this.label4.Text = "Vượt khung";
            this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txt_hsud
            // 
            this.txt_hsud.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_hsud.Location = new System.Drawing.Point(280, 9);
            this.txt_hsud.MaxLength = 5;
            this.txt_hsud.Name = "txt_hsud";
            this.txt_hsud.Size = new System.Drawing.Size(45, 22);
            this.txt_hsud.TabIndex = 11;
            this.txt_hsud.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_hsud_KeyPress);
            this.txt_hsud.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_hsud_KeyDown);
            // 
            // label7
            // 
            this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label7.ForeColor = System.Drawing.Color.DarkBlue;
            this.label7.Location = new System.Drawing.Point(233, 14);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(39, 13);
            this.label7.TabIndex = 122;
            this.label7.Text = "Ưu đãi";
            this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label6
            // 
            this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label6.ForeColor = System.Drawing.Color.DarkBlue;
            this.label6.Location = new System.Drawing.Point(271, 16);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(57, 13);
            this.label6.TabIndex = 118;
            this.label6.Text = "Đến tháng";
            this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txt_denthang
            // 
            this.txt_denthang.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_denthang.Location = new System.Drawing.Point(274, 32);
            this.txt_denthang.MaxLength = 2;
            this.txt_denthang.Name = "txt_denthang";
            this.txt_denthang.Size = new System.Drawing.Size(54, 20);
            this.txt_denthang.TabIndex = 4;
            this.txt_denthang.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_denthang_KeyPress);
            this.txt_denthang.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_denthang_KeyDown);
            // 
            // label5
            // 
            this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label5.ForeColor = System.Drawing.Color.DarkBlue;
            this.label5.Location = new System.Drawing.Point(89, 16);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(50, 13);
            this.label5.TabIndex = 116;
            this.label5.Text = "Từ tháng";
            this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txt_dennam
            // 
            this.txt_dennam.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_dennam.Location = new System.Drawing.Point(333, 32);
            this.txt_dennam.MaxLength = 4;
            this.txt_dennam.Name = "txt_dennam";
            this.txt_dennam.Size = new System.Drawing.Size(48, 20);
            this.txt_dennam.TabIndex = 5;
            this.txt_dennam.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_dennam_KeyPress);
            this.txt_dennam.Validated += new System.EventHandler(this.txt_dennam_Validated);
            this.txt_dennam.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_dennam_KeyDown);
            // 
            // cbngenghiep
            // 
            this.cbngenghiep.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cbngenghiep.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cbngenghiep.FormattingEnabled = true;
            this.cbngenghiep.Location = new System.Drawing.Point(513, 31);
            this.cbngenghiep.Name = "cbngenghiep";
            this.cbngenghiep.Size = new System.Drawing.Size(121, 21);
            this.cbngenghiep.TabIndex = 7;
            this.cbngenghiep.Validated += new System.EventHandler(this.cbngenghiep_Validated);
            this.cbngenghiep.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cbngenghiep_KeyDown);
            // 
            // label3
            // 
            this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label3.ForeColor = System.Drawing.Color.DarkBlue;
            this.label3.Location = new System.Drawing.Point(137, 16);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(46, 13);
            this.label3.TabIndex = 114;
            this.label3.Text = "Từ năm ";
            this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txtDN_CT
            // 
            this.txtDN_CT.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtDN_CT.Location = new System.Drawing.Point(189, 31);
            this.txtDN_CT.Mask = "00/00/0000";
            this.txtDN_CT.Name = "txtDN_CT";
            this.txtDN_CT.Size = new System.Drawing.Size(78, 22);
            this.txtDN_CT.TabIndex = 3;
            this.txtDN_CT.ValidatingType = typeof(System.DateTime);
            this.txtDN_CT.Validated += new System.EventHandler(this.txtDN_CT_Validated);
            this.txtDN_CT.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtDN_CT_KeyDown);
            this.txtDN_CT.TextChanged += new System.EventHandler(this.txtDN_CT_TextChanged);
            // 
            // label2
            // 
            this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label2.ForeColor = System.Drawing.Color.DarkBlue;
            this.label2.Location = new System.Drawing.Point(324, 16);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(56, 13);
            this.label2.TabIndex = 113;
            this.label2.Text = " Đến năm ";
            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // txt_tuthang
            // 
            this.txt_tuthang.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_tuthang.Location = new System.Drawing.Point(92, 31);
            this.txt_tuthang.MaxLength = 2;
            this.txt_tuthang.Name = "txt_tuthang";
            this.txt_tuthang.Size = new System.Drawing.Size(42, 20);
            this.txt_tuthang.TabIndex = 1;
            this.txt_tuthang.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_tuthang_KeyPress);
            this.txt_tuthang.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_tuthang_KeyDown);
            // 
            // txt_tunam
            // 
            this.txt_tunam.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txt_tunam.Location = new System.Drawing.Point(140, 31);
            this.txt_tunam.MaxLength = 4;
            this.txt_tunam.Name = "txt_tunam";
            this.txt_tunam.Size = new System.Drawing.Size(42, 20);
            this.txt_tunam.TabIndex = 2;
            this.txt_tunam.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_tunam_KeyPress);
            this.txt_tunam.Validated += new System.EventHandler(this.txt_tunam_Validated);
            this.txt_tunam.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txt_tunam_KeyDown);
            // 
            // txtTN_CT
            // 
            this.txtTN_CT.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtTN_CT.Location = new System.Drawing.Point(8, 31);
            this.txtTN_CT.Mask = "00/00/0000";
            this.txtTN_CT.Name = "txtTN_CT";
            this.txtTN_CT.Size = new System.Drawing.Size(78, 22);
            this.txtTN_CT.TabIndex = 0;
            this.txtTN_CT.ValidatingType = typeof(System.DateTime);
            this.txtTN_CT.Validated += new System.EventHandler(this.txtTN_CT_Validated);
            this.txtTN_CT.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtTN_CT_KeyDown);
            this.txtTN_CT.TextChanged += new System.EventHandler(this.txtTN_CT_TextChanged);
            // 
            // txtDV_CT
            // 
            this.txtDV_CT.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtDV_CT.Location = new System.Drawing.Point(640, 31);
            this.txtDV_CT.MaxLength = 60;
            this.txtDV_CT.Name = "txtDV_CT";
            this.txtDV_CT.Size = new System.Drawing.Size(180, 22);
            this.txtDV_CT.TabIndex = 8;
            this.txtDV_CT.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtDV_CT_KeyPress);
            this.txtDV_CT.Validated += new System.EventHandler(this.txtDV_CT_Validated);
            this.txtDV_CT.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtDV_CT_KeyDown);
            // 
            // label167
            // 
            this.label167.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label167.ForeColor = System.Drawing.Color.DarkBlue;
            this.label167.Location = new System.Drawing.Point(640, 16);
            this.label167.Name = "label167";
            this.label167.Size = new System.Drawing.Size(41, 13);
            this.label167.TabIndex = 54;
            this.label167.Text = "Đơn vị ";
            this.label167.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label166
            // 
            this.label166.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label166.ForeColor = System.Drawing.Color.DarkBlue;
            this.label166.Location = new System.Drawing.Point(384, 16);
            this.label166.Name = "label166";
            this.label166.Size = new System.Drawing.Size(50, 13);
            this.label166.TabIndex = 53;
            this.label166.Text = "Chức vụ ";
            this.label166.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // cbchucvu
            // 
            this.cbchucvu.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cbchucvu.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cbchucvu.FormattingEnabled = true;
            this.cbchucvu.Location = new System.Drawing.Point(387, 31);
            this.cbchucvu.Name = "cbchucvu";
            this.cbchucvu.Size = new System.Drawing.Size(121, 21);
            this.cbchucvu.TabIndex = 6;
            this.cbchucvu.Validated += new System.EventHandler(this.cbchucvu_Validated);
            this.cbchucvu.KeyDown += new System.Windows.Forms.KeyEventHandler(this.cbchucvu_KeyDown);
            // 
            // label165
            // 
            this.label165.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label165.ForeColor = System.Drawing.Color.DarkBlue;
            this.label165.Location = new System.Drawing.Point(510, 16);
            this.label165.Name = "label165";
            this.label165.Size = new System.Drawing.Size(71, 13);
            this.label165.TabIndex = 52;
            this.label165.Text = "Nghề nghiệp ";
            this.label165.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label164
            // 
            this.label164.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label164.ForeColor = System.Drawing.Color.DarkBlue;
            this.label164.Location = new System.Drawing.Point(186, 14);
            this.label164.Name = "label164";
            this.label164.Size = new System.Drawing.Size(56, 13);
            this.label164.TabIndex = 51;
            this.label164.Text = "Đến ngày ";
            this.label164.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // label163
            // 
            this.label163.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label163.ForeColor = System.Drawing.Color.DarkBlue;
            this.label163.Location = new System.Drawing.Point(6, 16);
            this.label163.Name = "label163";
            this.label163.Size = new System.Drawing.Size(49, 13);
            this.label163.TabIndex = 50;
            this.label163.Text = "Từ ngày ";
            this.label163.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // cmdLuu_CT
            // 
            this.cmdLuu_CT.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cmdLuu_CT.ForeColor = System.Drawing.Color.Blue;
            this.cmdLuu_CT.Location = new System.Drawing.Point(704, 64);
            this.cmdLuu_CT.Name = "cmdLuu_CT";
            this.cmdLuu_CT.Size = new System.Drawing.Size(64, 23);
            this.cmdLuu_CT.TabIndex = 62;
            this.cmdLuu_CT.Text = "Lưu";
            this.cmdLuu_CT.Visible = false;
            // 
            // txtKyNang
            // 
            this.txtKyNang.Enabled = false;
            this.txtKyNang.ForeColor = System.Drawing.SystemColors.WindowText;
            this.txtKyNang.Location = new System.Drawing.Point(456, 392);
            this.txtKyNang.Multiline = true;
            this.txtKyNang.Name = "txtKyNang";
            this.txtKyNang.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
            this.txtKyNang.Size = new System.Drawing.Size(368, 110);
            this.txtKyNang.TabIndex = 14;
            this.txtKyNang.Visible = false;
            // 
            // txtSoThich
            // 
            this.txtSoThich.Enabled = false;
            this.txtSoThich.ForeColor = System.Drawing.SystemColors.WindowText;
            this.txtSoThich.Location = new System.Drawing.Point(4, 392);
            this.txtSoThich.Multiline = true;
            this.txtSoThich.Name = "txtSoThich";
            this.txtSoThich.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
            this.txtSoThich.Size = new System.Drawing.Size(368, 110);
            this.txtSoThich.TabIndex = 13;
            this.txtSoThich.Visible = false;
            // 
            // ckbKyNang
            // 
            this.ckbKyNang.ForeColor = System.Drawing.Color.MediumBlue;
            this.ckbKyNang.Location = new System.Drawing.Point(456, 362);
            this.ckbKyNang.Name = "ckbKyNang";
            this.ckbKyNang.Size = new System.Drawing.Size(104, 24);
            this.ckbKyNang.TabIndex = 12;
            this.ckbKyNang.Text = "Kỹ năng";
            this.ckbKyNang.CheckStateChanged += new System.EventHandler(this.ckbKyNang_CheckStateChanged);
            // 
            // ckbSoThich
            // 
            this.ckbSoThich.ForeColor = System.Drawing.Color.MediumBlue;
            this.ckbSoThich.Location = new System.Drawing.Point(4, 362);
            this.ckbSoThich.Name = "ckbSoThich";
            this.ckbSoThich.Size = new System.Drawing.Size(104, 24);
            this.ckbSoThich.TabIndex = 11;
            this.ckbSoThich.Text = "Sở thích";
            this.ckbSoThich.CheckStateChanged += new System.EventHandler(this.ckbSoThich_CheckStateChanged);
            // 
            // txtTSo
            // 
            this.txtTSo.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtTSo.ForeColor = System.Drawing.Color.Red;
            this.txtTSo.Location = new System.Drawing.Point(85, 518);
            this.txtTSo.Name = "txtTSo";
            this.txtTSo.ReadOnly = true;
            this.txtTSo.Size = new System.Drawing.Size(64, 22);
            this.txtTSo.TabIndex = 16;
            this.txtTSo.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
            this.txtTSo.WordWrap = false;
            // 
            // label27
            // 
            this.label27.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label27.ForeColor = System.Drawing.Color.Blue;
            this.label27.Location = new System.Drawing.Point(26, 521);
            this.label27.Name = "label27";
            this.label27.Size = new System.Drawing.Size(56, 24);
            this.label27.TabIndex = 18;
            this.label27.Text = "Tổng  Số ";
            this.label27.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // panButLyLich
            // 
            this.panButLyLich.Controls.Add(this.btn_boqua);
            this.panButLyLich.Controls.Add(this.btn_sua);
            this.panButLyLich.Controls.Add(this.btnthem);
            this.panButLyLich.Controls.Add(this.btn_luu);
            this.panButLyLich.Controls.Add(this.butHuy);
            this.panButLyLich.Controls.Add(this.btn_thoat);
            this.panButLyLich.Controls.Add(this.panel2);
            this.panButLyLich.Controls.Add(this.checkBox2);
            this.panButLyLich.Controls.Add(this.textBox2);
            this.panButLyLich.Location = new System.Drawing.Point(155, 508);
            this.panButLyLich.Name = "panButLyLich";
            this.panButLyLich.Size = new System.Drawing.Size(445, 43);
            this.panButLyLich.TabIndex = 17;
            // 
            // btn_boqua
            // 
            this.btn_boqua.Enabled = false;
            this.btn_boqua.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.btn_boqua.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.btn_boqua.Image = ((System.Drawing.Image)(resources.GetObject("btn_boqua.Image")));
            this.btn_boqua.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.btn_boqua.Location = new System.Drawing.Point(211, 8);
            this.btn_boqua.Name = "btn_boqua";
            this.btn_boqua.Size = new System.Drawing.Size(70, 28);
            this.btn_boqua.TabIndex = 11;
            this.btn_boqua.Text = "&Bỏ qua";
            this.btn_boqua.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.toolTip1.SetToolTip(this.btn_boqua, "Alt+B");
            this.btn_boqua.Click += new System.EventHandler(this.btn_boqua_Click);
            // 
            // btn_sua
            // 
            this.btn_sua.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.btn_sua.ForeColor = System.Drawing.Color.DarkBlue;
            this.btn_sua.Image = global::Human.Properties.Resources.quick_edit;
            this.btn_sua.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.btn_sua.Location = new System.Drawing.Point(78, 8);
            this.btn_sua.Name = "btn_sua";
            this.btn_sua.Size = new System.Drawing.Size(60, 28);
            this.btn_sua.TabIndex = 9;
            this.btn_sua.Text = "   &Sửa";
            this.btn_sua.UseVisualStyleBackColor = true;
            this.btn_sua.Click += new System.EventHandler(this.btn_sua_Click);
            this.btn_sua.KeyDown += new System.Windows.Forms.KeyEventHandler(this.btn_sua_KeyDown);
            // 
            // btnthem
            // 
            this.btnthem.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.btnthem.ForeColor = System.Drawing.Color.DarkBlue;
            this.btnthem.Image = global::Human.Properties.Resources.add;
            this.btnthem.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.btnthem.Location = new System.Drawing.Point(12, 8);
            this.btnthem.Name = "btnthem";
            this.btnthem.Size = new System.Drawing.Size(60, 28);
            this.btnthem.TabIndex = 8;
            this.btnthem.Text = "&Thêm";
            this.btnthem.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.btnthem.UseVisualStyleBackColor = true;
            this.btnthem.Click += new System.EventHandler(this.btnthem_Click);
            this.btnthem.KeyDown += new System.Windows.Forms.KeyEventHandler(this.btnthem_KeyDown);
            // 
            // btn_luu
            // 
            this.btn_luu.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.btn_luu.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.btn_luu.Image = ((System.Drawing.Image)(resources.GetObject("btn_luu.Image")));
            this.btn_luu.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.btn_luu.Location = new System.Drawing.Point(144, 8);
            this.btn_luu.Name = "btn_luu";
            this.btn_luu.Size = new System.Drawing.Size(60, 28);
            this.btn_luu.TabIndex = 10;
            this.btn_luu.Text = "   &Lưu";
            this.btn_luu.Click += new System.EventHandler(this.btn_luu_Click);
            this.btn_luu.KeyDown += new System.Windows.Forms.KeyEventHandler(this.btn_luu_KeyDown);
            // 
            // butHuy
            // 
            this.butHuy.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.butHuy.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.butHuy.Image = ((System.Drawing.Image)(resources.GetObject("butHuy.Image")));
            this.butHuy.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.butHuy.Location = new System.Drawing.Point(287, 8);
            this.butHuy.Name = "butHuy";
            this.butHuy.Size = new System.Drawing.Size(60, 28);
            this.butHuy.TabIndex = 10;
            this.butHuy.Text = "  &Hủy";
            this.butHuy.Click += new System.EventHandler(this.butHuy_Click);
            this.butHuy.KeyDown += new System.Windows.Forms.KeyEventHandler(this.butHuy_KeyDown);
            // 
            // btn_thoat
            // 
            this.btn_thoat.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.btn_thoat.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.btn_thoat.Image = global::Human.Properties.Resources.close_r;
            this.btn_thoat.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.btn_thoat.Location = new System.Drawing.Point(353, 8);
            this.btn_thoat.Name = "btn_thoat";
            this.btn_thoat.Size = new System.Drawing.Size(80, 28);
            this.btn_thoat.TabIndex = 11;
            this.btn_thoat.Text = "&Kết thúc";
            this.btn_thoat.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.btn_thoat.Click += new System.EventHandler(this.btn_thoat_Click);
            this.btn_thoat.KeyDown += new System.Windows.Forms.KeyEventHandler(this.btn_thoat_KeyDown);
            // 
            // panel2
            // 
            this.panel2.Controls.Add(this.button7);
            this.panel2.Controls.Add(this.button8);
            this.panel2.Controls.Add(this.button9);
            this.panel2.Controls.Add(this.button10);
            this.panel2.Controls.Add(this.button11);
            this.panel2.Controls.Add(this.button12);
            this.panel2.Location = new System.Drawing.Point(0, 0);
            this.panel2.Name = "panel2";
            this.panel2.Size = new System.Drawing.Size(445, 43);
            this.panel2.TabIndex = 17;
            // 
            // button7
            // 
            this.button7.Enabled = false;
            this.button7.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.button7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.button7.Image = ((System.Drawing.Image)(resources.GetObject("button7.Image")));
            this.button7.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.button7.Location = new System.Drawing.Point(211, 8);
            this.button7.Name = "button7";
            this.button7.Size = new System.Drawing.Size(70, 28);
            this.button7.TabIndex = 11;
            this.button7.Text = "&Bỏ qua";
            this.button7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.button7.Click += new System.EventHandler(this.btn_boqua_Click);
            // 
            // button8
            // 
            this.button8.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.button8.ForeColor = System.Drawing.Color.DarkBlue;
            this.button8.Image = global::Human.Properties.Resources.quick_edit;
            this.button8.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.button8.Location = new System.Drawing.Point(78, 8);
            this.button8.Name = "button8";
            this.button8.Size = new System.Drawing.Size(60, 28);
            this.button8.TabIndex = 8;
            this.button8.Text = "   &Sửa";
            this.button8.UseVisualStyleBackColor = true;
            this.button8.Click += new System.EventHandler(this.btn_sua_Click);
            this.button8.KeyDown += new System.Windows.Forms.KeyEventHandler(this.btn_sua_KeyDown);
            // 
            // button9
            // 
            this.button9.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.button9.ForeColor = System.Drawing.Color.DarkBlue;
            this.button9.Image = global::Human.Properties.Resources.add;
            this.button9.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.button9.Location = new System.Drawing.Point(12, 8);
            this.button9.Name = "button9";
            this.button9.Size = new System.Drawing.Size(60, 28);
            this.button9.TabIndex = 7;
            this.button9.Text = "&Thêm";
            this.button9.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.button9.UseVisualStyleBackColor = true;
            this.button9.Click += new System.EventHandler(this.btnthem_Click);
            this.button9.KeyDown += new System.Windows.Forms.KeyEventHandler(this.btnthem_KeyDown);
            // 
            // button10
            // 
            this.button10.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.button10.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.button10.Image = ((System.Drawing.Image)(resources.GetObject("button10.Image")));
            this.button10.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.button10.Location = new System.Drawing.Point(144, 8);
            this.button10.Name = "button10";
            this.button10.Size = new System.Drawing.Size(60, 28);
            this.button10.TabIndex = 6;
            this.button10.Text = "   &Lưu";
            this.button10.Click += new System.EventHandler(this.btn_luu_Click);
            this.button10.KeyDown += new System.Windows.Forms.KeyEventHandler(this.btn_luu_KeyDown);
            // 
            // button11
            // 
            this.button11.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.button11.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.button11.Image = ((System.Drawing.Image)(resources.GetObject("button11.Image")));
            this.button11.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.button11.Location = new System.Drawing.Point(287, 8);
            this.button11.Name = "button11";
            this.button11.Size = new System.Drawing.Size(60, 28);
            this.button11.TabIndex = 9;
            this.button11.Text = "  &Hủy";
            this.button11.Click += new System.EventHandler(this.butHuy_Click);
            this.button11.KeyDown += new System.Windows.Forms.KeyEventHandler(this.butHuy_KeyDown);
            // 
            // button12
            // 
            this.button12.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.button12.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.button12.Image = global::Human.Properties.Resources.close_r;
            this.button12.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.button12.Location = new System.Drawing.Point(353, 8);
            this.button12.Name = "button12";
            this.button12.Size = new System.Drawing.Size(80, 28);
            this.button12.TabIndex = 10;
            this.button12.Text = "&Kết thúc";
            this.button12.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.button12.Click += new System.EventHandler(this.btn_thoat_Click);
            this.button12.KeyDown += new System.Windows.Forms.KeyEventHandler(this.btn_thoat_KeyDown);
            // 
            // checkBox2
            // 
            this.checkBox2.ForeColor = System.Drawing.Color.MediumBlue;
            this.checkBox2.Location = new System.Drawing.Point(-133, -158);
            this.checkBox2.Name = "checkBox2";
            this.checkBox2.Size = new System.Drawing.Size(104, 24);
            this.checkBox2.TabIndex = 11;
            this.checkBox2.Text = "Sở thích";
            this.checkBox2.CheckStateChanged += new System.EventHandler(this.ckbSoThich_CheckStateChanged);
            // 
            // textBox2
            // 
            this.textBox2.Enabled = false;
            this.textBox2.ForeColor = System.Drawing.SystemColors.WindowText;
            this.textBox2.Location = new System.Drawing.Point(-133, -134);
            this.textBox2.Multiline = true;
            this.textBox2.Name = "textBox2";
            this.textBox2.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
            this.textBox2.Size = new System.Drawing.Size(368, 128);
            this.textBox2.TabIndex = 13;
            this.textBox2.Visible = false;
            // 
            // dtpNgayCongTac
            // 
            this.dtpNgayCongTac.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.dtpNgayCongTac.Location = new System.Drawing.Point(606, 516);
            this.dtpNgayCongTac.Mask = "##/##/####";
            this.dtpNgayCongTac.Name = "dtpNgayCongTac";
            this.dtpNgayCongTac.Size = new System.Drawing.Size(100, 23);
            this.dtpNgayCongTac.TabIndex = 28;
            this.dtpNgayCongTac.Text = "__/__/____";
            this.dtpNgayCongTac.Visible = false;
            // 
            // dgrThanhVienGD
            // 
            this.dgrThanhVienGD.AllowDrop = true;
            this.dgrThanhVienGD.AllowUserToAddRows = false;
            this.dgrThanhVienGD.AllowUserToDeleteRows = false;
            dataGridViewCellStyle12.BackColor = System.Drawing.Color.MintCream;
            dataGridViewCellStyle12.ForeColor = System.Drawing.Color.Blue;
            dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
            dataGridViewCellStyle12.SelectionForeColor = System.Drawing.Color.Blue;
            this.dgrThanhVienGD.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle12;
            this.dgrThanhVienGD.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells;
            this.dgrThanhVienGD.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.DisplayedCells;
            this.dgrThanhVienGD.BackgroundColor = System.Drawing.Color.White;
            this.dgrThanhVienGD.BorderStyle = System.Windows.Forms.BorderStyle.None;
            dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Control;
            dataGridViewCellStyle13.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.WindowText;
            dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight;
            dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
            dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
            this.dgrThanhVienGD.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle13;
            this.dgrThanhVienGD.ColumnHeadersHeight = 25;
            this.dgrThanhVienGD.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
            this.ngayhl,
            this.tunam,
            this.denngay,
            this.dennam,
            this.Column1_5,
            this.Column1_7,
            this.Column1_8,
            this.mad,
            this.id});
            this.dgrThanhVienGD.ContextMenuStrip = this.contextMenuStrip1;
            dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle20.BackColor = System.Drawing.Color.White;
            dataGridViewCellStyle20.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.ControlText;
            dataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Control;
            dataGridViewCellStyle20.SelectionForeColor = System.Drawing.Color.Blue;
            dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
            this.dgrThanhVienGD.DefaultCellStyle = dataGridViewCellStyle20;
            this.dgrThanhVienGD.Location = new System.Drawing.Point(4, 46);
            this.dgrThanhVienGD.MultiSelect = false;
            this.dgrThanhVienGD.Name = "dgrThanhVienGD";
            dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Control;
            dataGridViewCellStyle21.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.ControlText;
            dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight;
            dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.ControlDark;
            dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
            this.dgrThanhVienGD.RowHeadersDefaultCellStyle = dataGridViewCellStyle21;
            this.dgrThanhVienGD.RowHeadersWidth = 25;
            dataGridViewCellStyle22.ForeColor = System.Drawing.Color.Black;
            dataGridViewCellStyle22.SelectionBackColor = System.Drawing.Color.White;
            dataGridViewCellStyle22.SelectionForeColor = System.Drawing.Color.Black;
            this.dgrThanhVienGD.RowsDefaultCellStyle = dataGridViewCellStyle22;
            this.dgrThanhVienGD.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
            this.dgrThanhVienGD.Size = new System.Drawing.Size(820, 212);
            this.dgrThanhVienGD.StandardTab = true;
            this.dgrThanhVienGD.TabIndex = 108;
            this.toolTip1.SetToolTip(this.dgrThanhVienGD, "Nhấn chuột phải lên lưới Thêm , Hủy");
            this.dgrThanhVienGD.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgrThanhVienGD_CellClick);
            // 
            // ngayhl
            // 
            this.ngayhl.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
            this.ngayhl.DataPropertyName = "tungay";
            dataGridViewCellStyle14.ForeColor = System.Drawing.Color.Blue;
            dataGridViewCellStyle14.SelectionBackColor = System.Drawing.Color.Silver;
            dataGridViewCellStyle14.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
            this.ngayhl.DefaultCellStyle = dataGridViewCellStyle14;
            this.ngayhl.Frozen = true;
            this.ngayhl.HeaderText = "Từ ngày";
            this.ngayhl.Name = "ngayhl";
            this.ngayhl.ReadOnly = true;
            this.ngayhl.Width = 75;
            // 
            // tunam
            // 
            this.tunam.DataPropertyName = "tunam";
            dataGridViewCellStyle15.ForeColor = System.Drawing.Color.Blue;
            dataGridViewCellStyle15.SelectionBackColor = System.Drawing.Color.Silver;
            dataGridViewCellStyle15.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
            this.tunam.DefaultCellStyle = dataGridViewCellStyle15;
            this.tunam.Frozen = true;
            this.tunam.HeaderText = "Từ năm";
            this.tunam.Name = "tunam";
            this.tunam.Width = 66;
            // 
            // denngay
            // 
            this.denngay.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
            this.denngay.DataPropertyName = "denngay";
            dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.denngay.DefaultCellStyle = dataGridViewCellStyle16;
            this.denngay.Frozen = true;
            this.denngay.HeaderText = "Đến ngày";
            this.denngay.Name = "denngay";
            this.denngay.ReadOnly = true;
            this.denngay.Width = 75;
            // 
            // dennam
            // 
            this.dennam.DataPropertyName = "dennam";
            this.dennam.Frozen = true;
            this.dennam.HeaderText = "Đến năm";
            this.dennam.Name = "dennam";
            this.dennam.Width = 73;
            // 
            // Column1_5
            // 
            this.Column1_5.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
            this.Column1_5.DataPropertyName = "ten";
            dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            this.Column1_5.DefaultCellStyle = dataGridViewCellStyle17;
            this.Column1_5.Frozen = true;
            this.Column1_5.HeaderText = "Nghề Nghiệp";
            this.Column1_5.Name = "Column1_5";
            this.Column1_5.ReadOnly = true;
            this.Column1_5.Width = 125;
            // 
            // Column1_7
            // 
            this.Column1_7.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
            this.Column1_7.DataPropertyName = "diengiai";
            dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle18.Format = "### ### ##0.##";
            dataGridViewCellStyle18.NullValue = "0";
            dataGridViewCellStyle18.Padding = new System.Windows.Forms.Padding(0, 0, 2, 0);
            this.Column1_7.DefaultCellStyle = dataGridViewCellStyle18;
            this.Column1_7.HeaderText = "Chức vụ";
            this.Column1_7.Name = "Column1_7";
            this.Column1_7.ReadOnly = true;
            this.Column1_7.Width = 120;
            // 
            // Column1_8
            // 
            this.Column1_8.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
            this.Column1_8.DataPropertyName = "donvi";
            dataGridViewCellStyle19.Format = "### ### ### ##0.##";
            dataGridViewCellStyle19.NullValue = "0";
            dataGridViewCellStyle19.Padding = new System.Windows.Forms.Padding(0, 0, 2, 0);
            this.Column1_8.DefaultCellStyle = dataGridViewCellStyle19;
            this.Column1_8.HeaderText = "Đơn vị";
            this.Column1_8.Name = "Column1_8";
            this.Column1_8.ReadOnly = true;
            this.Column1_8.Width = 170;
            // 
            // mad
            // 
            this.mad.DataPropertyName = "mucluong";
            this.mad.HeaderText = "Hệ số";
            this.mad.Name = "mad";
            this.mad.ReadOnly = true;
            this.mad.Width = 58;
            // 
            // id
            // 
            this.id.DataPropertyName = "id";
            this.id.HeaderText = "id";
            this.id.Name = "id";
            this.id.ReadOnly = true;
            this.id.Visible = false;
            this.id.Width = 38;
            // 
            // contextMenuStrip1
            // 
            this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.thêmToolStripMenuItem,
            this.hủyToolStripMenuItem});
            this.contextMenuStrip1.Name = "contextMenuStrip1";
            this.contextMenuStrip1.Size = new System.Drawing.Size(101, 48);
            // 
            // thêmToolStripMenuItem
            // 
            this.thêmToolStripMenuItem.Name = "thêmToolStripMenuItem";
            this.thêmToolStripMenuItem.Size = new System.Drawing.Size(100, 22);
            this.thêmToolStripMenuItem.Text = "&Thêm";
            this.thêmToolStripMenuItem.Click += new System.EventHandler(this.menuItem1_Click);
            // 
            // hủyToolStripMenuItem
            // 
            this.hủyToolStripMenuItem.Name = "hủyToolStripMenuItem";
            this.hủyToolStripMenuItem.Size = new System.Drawing.Size(100, 22);
            this.hủyToolStripMenuItem.Text = "&Hủy";
            this.hủyToolStripMenuItem.Click += new System.EventHandler(this.hủyToolStripMenuItem_Click);
            // 
            // panCongTac
            // 
            this.panCongTac.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.panCongTac.Controls.Add(this.label1);
            this.panCongTac.Controls.Add(this.lblTenPhongCT);
            this.panCongTac.Controls.Add(this.lblHoTenNVCT);
            this.panCongTac.Controls.Add(this.label29);
            this.panCongTac.Controls.Add(this.lblMasoNVCT);
            this.panCongTac.Controls.Add(this.label28);
            this.panCongTac.Dock = System.Windows.Forms.DockStyle.Top;
            this.panCongTac.Location = new System.Drawing.Point(0, 0);
            this.panCongTac.Name = "panCongTac";
            this.panCongTac.Size = new System.Drawing.Size(828, 40);
            this.panCongTac.TabIndex = 109;
            // 
            // label1
            // 
            this.label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.label1.Font = new System.Drawing.Font("Tahoma", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label1.ForeColor = System.Drawing.Color.White;
            this.label1.Location = new System.Drawing.Point(3, 0);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(134, 40);
            this.label1.TabIndex = 5;
            this.label1.Text = "CÔNG TÁC";
            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // lblTenPhongCT
            // 
            this.lblTenPhongCT.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.lblTenPhongCT.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblTenPhongCT.ForeColor = System.Drawing.Color.White;
            this.lblTenPhongCT.Location = new System.Drawing.Point(603, 0);
            this.lblTenPhongCT.Name = "lblTenPhongCT";
            this.lblTenPhongCT.Size = new System.Drawing.Size(178, 40);
            this.lblTenPhongCT.TabIndex = 4;
            this.lblTenPhongCT.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // lblHoTenNVCT
            // 
            this.lblHoTenNVCT.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.lblHoTenNVCT.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblHoTenNVCT.ForeColor = System.Drawing.Color.White;
            this.lblHoTenNVCT.Location = new System.Drawing.Point(362, 0);
            this.lblHoTenNVCT.Name = "lblHoTenNVCT";
            this.lblHoTenNVCT.Size = new System.Drawing.Size(243, 40);
            this.lblHoTenNVCT.TabIndex = 3;
            this.lblHoTenNVCT.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            // 
            // label29
            // 
            this.label29.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.label29.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label29.ForeColor = System.Drawing.Color.White;
            this.label29.Location = new System.Drawing.Point(306, 0);
            this.label29.Name = "label29";
            this.label29.Size = new System.Drawing.Size(56, 40);
            this.label29.TabIndex = 2;
            this.label29.Text = "Họ tên ";
            this.label29.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // lblMasoNVCT
            // 
            this.lblMasoNVCT.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.lblMasoNVCT.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblMasoNVCT.ForeColor = System.Drawing.Color.White;
            this.lblMasoNVCT.Location = new System.Drawing.Point(202, 0);
            this.lblMasoNVCT.Name = "lblMasoNVCT";
            this.lblMasoNVCT.Size = new System.Drawing.Size(80, 40);
            this.lblMasoNVCT.TabIndex = 1;
            this.lblMasoNVCT.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            // 
            // label28
            // 
            this.label28.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.label28.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label28.ForeColor = System.Drawing.Color.White;
            this.label28.Location = new System.Drawing.Point(145, 0);
            this.label28.Name = "label28";
            this.label28.Size = new System.Drawing.Size(61, 40);
            this.label28.TabIndex = 0;
            this.label28.Text = "Mã số ";
            this.label28.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // txtId
            // 
            this.txtId.Location = new System.Drawing.Point(726, 518);
            this.txtId.Name = "txtId";
            this.txtId.Size = new System.Drawing.Size(54, 20);
            this.txtId.TabIndex = 110;
            // 
            // panel1
            // 
            this.panel1.Controls.Add(this.button1);
            this.panel1.Controls.Add(this.button2);
            this.panel1.Controls.Add(this.button3);
            this.panel1.Controls.Add(this.button4);
            this.panel1.Controls.Add(this.button5);
            this.panel1.Controls.Add(this.button6);
            this.panel1.Location = new System.Drawing.Point(155, 508);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(445, 43);
            this.panel1.TabIndex = 17;
            // 
            // button1
            // 
            this.button1.Enabled = false;
            this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.button1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(160)))));
            this.button1.Image = ((System.Drawing.Image)(resources.GetObject("button1.Image")));
            this.button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.button1.Location = new System.Drawing.Point(211, 8);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(70, 28);
            this.button1.TabIndex = 11;
            this.button1.Text = "&Bỏ qua";
            this.button1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.button1.Click += new System.EventHandler(this.btn_boqua_Click);
            // 
            // button2
            // 
            this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.button2.ForeColor = System.Drawing.Color.DarkBlue;
            this.button2.Image = global::Human.Properties.Resources.quick_edit;
            this.button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.button2.Location = new System.Drawing.Point(78, 8);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(60, 28);
            this.button2.TabIndex = 8;
            this.button2.Text = "   &Sửa";
            this.button2.UseVisualStyleBackColor = true;
            this.button2.Click += new System.EventHandler(this.btn_sua_Click);
            this.button2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.btn_sua_KeyDown);
            // 
            // button3
            // 
            this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.button3.ForeColor = System.Drawing.Color.DarkBlue;
            this.button3.Image = global::Human.Properties.Resources.add;
            this.button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.button3.Location = new System.Drawing.Point(12, 8);
            this.button3.Name = "button3";
            this.button3.Size = new System.Drawing.Size(60, 28);
            this.button3.TabIndex = 7;
            this.button3.Text = "&Thêm";
            this.button3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.button3.UseVisualStyleBackColor = true;
            this.button3.Click += new System.EventHandler(this.btnthem_Click);
            this.button3.KeyDown += new System.Windows.Forms.KeyEventHandler(this.btnthem_KeyDown);
            // 
            // button4
            // 
            this.button4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.button4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.button4.Image = ((System.Drawing.Image)(resources.GetObject("button4.Image")));
            this.button4.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.button4.Location = new System.Drawing.Point(144, 8);
            this.button4.Name = "button4";
            this.button4.Size = new System.Drawing.Size(60, 28);
            this.button4.TabIndex = 6;
            this.button4.Text = "   &Lưu";
            this.button4.Click += new System.EventHandler(this.btn_luu_Click);
            this.button4.KeyDown += new System.Windows.Forms.KeyEventHandler(this.btn_luu_KeyDown);
            // 
            // button5
            // 
            this.button5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.button5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.button5.Image = ((System.Drawing.Image)(resources.GetObject("button5.Image")));
            this.button5.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.button5.Location = new System.Drawing.Point(287, 8);
            this.button5.Name = "button5";
            this.button5.Size = new System.Drawing.Size(60, 28);
            this.button5.TabIndex = 9;
            this.button5.Text = "  &Hủy";
            this.button5.Click += new System.EventHandler(this.butHuy_Click);
            this.button5.KeyDown += new System.Windows.Forms.KeyEventHandler(this.butHuy_KeyDown);
            // 
            // button6
            // 
            this.button6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.button6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(180)))));
            this.button6.Image = global::Human.Properties.Resources.close_r;
            this.button6.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.button6.Location = new System.Drawing.Point(353, 8);
            this.button6.Name = "button6";
            this.button6.Size = new System.Drawing.Size(80, 28);
            this.button6.TabIndex = 10;
            this.button6.Text = "&Kết thúc";
            this.button6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.button6.Click += new System.EventHandler(this.btn_thoat_Click);
            this.button6.KeyDown += new System.Windows.Forms.KeyEventHandler(this.btn_thoat_KeyDown);
            // 
            // chk_dict
            // 
            this.chk_dict.AutoSize = true;
            this.chk_dict.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.chk_dict.Location = new System.Drawing.Point(555, 70);
            this.chk_dict.Name = "chk_dict";
            this.chk_dict.Size = new System.Drawing.Size(81, 17);
            this.chk_dict.TabIndex = 14;
            this.chk_dict.Text = "Đi công tác";
            this.toolTip1.SetToolTip(this.chk_dict, "Chỉ chọn khi nhân viên đi công tác ngoài co quan");
            this.chk_dict.UseVisualStyleBackColor = true;
            this.chk_dict.KeyDown += new System.Windows.Forms.KeyEventHandler(this.chk_dict_KeyDown);
            // 
            // frmCongTac
            // 
            this.AccessibleRole = System.Windows.Forms.AccessibleRole.None;
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.AutoScroll = true;
            this.ClientSize = new System.Drawing.Size(828, 568);
            this.Controls.Add(this.panCongTac);
            this.Controls.Add(this.txtId);
            this.Controls.Add(this.txtTSo);
            this.Controls.Add(this.dtpNgayCongTac);
            this.Controls.Add(this.dgrThanhVienGD);
            this.Controls.Add(this.label27);
            this.Controls.Add(this.panButLyLich);
            this.Controls.Add(this.panel1);
            this.Controls.Add(this.txtKyNang);
            this.Controls.Add(this.ckbKyNang);
            this.Controls.Add(this.txtSoThich);
            this.Controls.Add(this.cmdLuu_CT);
            this.Controls.Add(this.ckbSoThich);
            this.Controls.Add(this.groupCT);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "frmCongTac";
            this.ShowInTaskbar = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Quá trình công tác";
            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.frmCongTac_KeyDown);
            this.Load += new System.EventHandler(this.frmCongTacSua_Load);
            this.groupCT.ResumeLayout(false);
            this.groupCT.PerformLayout();
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            this.panButLyLich.ResumeLayout(false);
            this.panButLyLich.PerformLayout();
            this.panel2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.dgrThanhVienGD)).EndInit();
            this.contextMenuStrip1.ResumeLayout(false);
            this.panCongTac.ResumeLayout(false);
            this.panel1.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();

		}
		#endregion

		private void txtTN_CT_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode==Keys.Enter)
				SendKeys.Send("{Tab}");
		}

		private int kiemtrangay(int dtemp,int y)
		{
			int d=0;
			
			switch(dtemp)
			{
				case 1:
				case 3:
				case 5:
				case 7:
				case 8:
				case 10:
				case 12:
					d=31;
					break;
				case 2:
					if((y%4)==0)
						d=29;
					else if((y%4)!=0)
						d=28;
					break;
				case 4:
				case 6:
				case 9:
				case 11:
					d=30;
					break;
			}
			return d;
		}
		private void txtTN_CT_Validated(object sender, System.EventArgs e)
		{
			string ma_nv2=lblMasoNVCT.Text;
			DataSet dshd=new DataSet();
			dshd=mDB.LyLichNVhd(lblMasoNVCT.Text);							
			DataRow[] rhd=dshd.Tables[0].Select("manv= '"+ma_nv2+"'");
			dtpNgayCongTac.Text=rhd[0]["m_ngaydenct"].ToString();
            txtTN_CT.Text = txtTN_CT.Text.Trim();
            if (txtTN_CT.Text == "  /  /")
            {
                return;
            }
            if (!mDB.kiemtrangayhople(txtTN_CT.Text))
            {

                txtTN_CT.Focus();
                return;
            }
			if(txtTN_CT.Text!="" && txtTN_CT.Text!="__/__/____")
			{
                int dd = 0, mm = 0, yy = 0; string n = "", t = "";
                dd = int.Parse(txtTN_CT.Text.Substring(0, 2));
				mm=int.Parse(txtTN_CT.Text.Substring(3,2));
				yy=int.Parse(txtTN_CT.Text.Substring(6));

                n = dd.ToString().PadLeft(2,'0');
                t = mm.ToString().PadLeft(2, '0');
               
				int ddns=0,mmns=0,yyns=0;				
				try
				{					
					ddns=int.Parse(dtpNgayCongTac.Text.Substring(0,2));
					mmns=int.Parse(dtpNgayCongTac.Text.Substring(3,2));
					yyns=int.Parse(dtpNgayCongTac.Text.Substring(6,4));
				}
				catch{}
                if (txtTN_CT.Text != "")
                {
                   
                    txt_tuthang.Text = t.ToString();//Convert.ToString(int.Parse(mm.ToString()));
                    txt_tunam.Text = Convert.ToString(int.Parse(yy.ToString()));

                    // txtTN_CT.Focus();
                }
                else
                {
                    txt_tuthang.Text = "";
                    txt_tunam.Text = "";
                }
				if(dd<=0 || dd >31)
				{
					MessageBox.Show(lan.Change_language_MessageText("Nhập ngày tháng không hợp lệ"),AccessData.Msg);
					txtTN_CT.Focus();
					return;
				}
				if(mm<=0 || mm>12)
				{
					MessageBox.Show(lan.Change_language_MessageText("Nhập ngày tháng không hợp lệ"),AccessData.Msg);
					txtTN_CT.Focus();
					return;
				}
				if(dd > kiemtrangay(mm,yy))
				{
					MessageBox.Show(lan.Change_language_MessageText("Nhập tháng không hợp lệ"),AccessData.Msg);
					txtTN_CT.Focus();
					return;
				}
			}
           
		}

		private void txtDN_CT_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode==Keys.Enter)
				SendKeys.Send("{Tab}{F4}");
		}
        DateTime tn, dn;
		private void txtDN_CT_Validated(object sender, System.EventArgs e)
		{
            txtDN_CT.Text = txtDN_CT.Text.Trim();
            if (txtDN_CT.Text == "  /  /")
            {
                return;
            }     
            if (!mDB.kiemtrangayhople(txtDN_CT.Text))
            {
                txtDN_CT.Focus();
                return;
            }
            if(txtDN_CT.Text!="")
		    {
			    if(txtDN_CT.Text.IndexOf("_")>0 && txtDN_CT.Text!="")
			    {
				    MessageBox.Show(lan.Change_language_MessageText("Nhập ngày tháng năm "),AccessData.Msg);
				    txtDN_CT.Focus();
				    return ;
			    }
                int dd = 0, mm = 0, yy = 0; string n = "", t = "";

			    int ddns=0,mmns=0,yyns=0;				
			    try
			    {					
				    ddns=int.Parse(txtTN_CT.Text.Substring(0,2));
				    mmns=int.Parse(txtTN_CT.Text.Substring(3,2));
				    yyns=int.Parse(txtTN_CT.Text.Substring(6,4));
			    }
			    catch{}

			    dd=int.Parse(txtDN_CT.Text.Substring(0,2));
			    mm=int.Parse(txtDN_CT.Text.Substring(3,2));
			    yy=int.Parse(txtDN_CT.Text.Substring(6));

                n = dd.ToString().PadLeft(2, '0');
                t = mm.ToString().PadLeft(2, '0');
               
                if (txtDN_CT.Text != "")
                {
                    
                    txt_denthang.Text = t.ToString();
                    txt_dennam.Text = Convert.ToString(int.Parse(yy.ToString()));
                    //txtDN_CT.Focus();
                }
                else
                {
                   
                    txt_denthang.Text = "";
                    txt_dennam.Text = "";
                }
                try
                {
                    if (yyns > yy)
                    {
                        MessageBox.Show(lan.Change_language_MessageText("Năm của từ ngày  phải nhỏ hơn năm của đến ngày "),AccessData.Msg);
                        txtDN_CT.Focus();
                        return;
                    }
                    if (yyns == yy)
                    {
                        if (mmns > mm)
                        {
                            MessageBox.Show(lan.Change_language_MessageText("Tháng của từ ngày phải nhỏ hơn tháng của đến ngày"),AccessData.Msg);
                            txtDN_CT.Focus();
                            return;
                        }
                        if (mmns == mm)
                        {
                            if (ddns > dd)
                            {
                                MessageBox.Show(lan.Change_language_MessageText("Ngày của từ ngày phải nhỏ hơn của đến ngày"),AccessData.Msg);
                                txtDN_CT.Focus();
                                return;
                            }
                        }
                    }
                }
                catch { }				

			    if(dd<=0 || dd >31)
			    {
				    MessageBox.Show(lan.Change_language_MessageText("Nhập ngày không hợp lệ"),AccessData.Msg);
				    txtDN_CT.Focus();
				    return;
			    }
			    if(mm<=0 || mm>12)
			    {
				    MessageBox.Show(lan.Change_language_MessageText("Nhập tháng không hợp lệ"),AccessData.Msg);
				    txtDN_CT.Focus();
				    return;
			    }
			    if(dd > kiemtrangay(mm,yy))
			    {
				    MessageBox.Show(lan.Change_language_MessageText("Nhập ngày không hợp lệ"),AccessData.Msg);
				    txtDN_CT.Focus();
				    return;
			    }
		    }
           
		}

		private void txtNN_CT_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode==Keys.Enter)
				SendKeys.Send("{Tab}{F4}");
		}

		private void txtNN_CT_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if(e.KeyChar==8)
				e.Handled=false;
		}

		private void txtCV_CT_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode==Keys.Enter)
				SendKeys.Send("{Tab}{F4}");
		}

		private void txtCV_CT_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if(e.KeyChar==8)
				e.Handled=false;
		}

		private void txtDV_CT_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode==Keys.Enter)
				SendKeys.Send("{Tab}");
		}

		private void txtDV_CT_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if(e.KeyChar==8)
				e.Handled=false;
		}

		private bool IsNumeric (string strNum)
		{	
			int iNum;
			try
			{
				iNum = int.Parse(strNum);
				return true;
			}
			catch
			{
				return false;
			}
		}
        
		private void txtHS_CT_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
			
        }	 

		private void txtHS_CT_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			if (!IsNumeric(e.KeyChar.ToString()))
				e.Handled = true;
			if(e.KeyChar==8 || e.KeyChar=='.')
				e.Handled=false;
		}

		private void txtHS_CT_Validated(object sender, System.EventArgs e)
		{
			decimal l=0;
			TinhhesoL(l,txtHS_CT);
		}
		private void TinhhesoL(decimal ld,TextBox txt)
		{
			ld=0;
			try
			{
				ld=decimal.Parse(txt.Text.Trim());
				txt.Text="";
				if(ld>0)
					txt.Text=ld.ToString("0.##");
			}
			catch
			{
				ld=0;
				txt.Text="";
			}
            
		}
        private void enacontrol(bool ena)
        {
            txtTN_CT.Enabled = ena;
            txtDN_CT.Enabled = ena;
        }

        //private bool kiemtra_ct()
        //{
        //    if (txtTN_CT.Text == "  /  /")
        //    {
        //        MessageBox.Show("Yêu cầu Nhập từ ngày công tác",AccessData.Msg,MessageBoxButtons.OK,MessageBoxIcon.Warning);
        //        setcontrol(true);
        //        txtTN_CT.Focus();	
        //        return false;
        //    }
        //    if (txtDN_CT.Text == "  /  /")
        //    {
        //        MessageBox.Show("Yêu cầu nhập đến ngày công tác",AccessData.Msg,MessageBoxButtons.OK,MessageBoxIcon.Warning);
								
        //        setcontrol(true);
        //        txtDN_CT.Focus();
        //        return false;
        //    }
        //    if (cbngenghiep.SelectedIndex == -1)
        //    {
        //        MessageBox.Show("Bạn phải chọn nghề nghiệp", "Thông Báo");
                
        //        setcontrol(true);
        //        cbngenghiep.Focus();
        //    }
        //    if (cbchucvu.SelectedIndex == -1)
        //    {
        //        MessageBox.Show("Bạn phải chọn nghề nghiệp", "Thông Báo");
                
        //        setcontrol(true);
        //        cbngenghiep.Focus();
        //    }          
        //    if(txtDV_CT.Text=="")
        //    {
        //        MessageBox.Show("Yêu cầu nhập đơn vị",AccessData.Msg,MessageBoxButtons.OK,MessageBoxIcon.Warning);
				
        //        setcontrol(true);
        //        txtDV_CT.Focus();
        //        return false;
                
        //    }
        //    return true;
        //}		

		private void dgrCongTac_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode==Keys.Enter)
				SendKeys.Send("{Tab}");
		}

		private void ckbSoThich_CheckStateChanged(object sender, System.EventArgs e)
		{
			if (ckbSoThich.Checked)
				txtSoThich.Visible = true;
			else
				txtSoThich.Visible = false;
		}

		private void ckbKyNang_CheckStateChanged(object sender, System.EventArgs e)
		{
			if (ckbKyNang.Checked)
				txtKyNang.Visible = true;
			else
				txtKyNang.Visible = false;
		}

		private void capnhat()
		{				
			load_LBL();
		}
		

		private void frmCongTacSua_Load(object sender, System.EventArgs e)
		{
            m_user = mDB.user;
            txtId.Hide();
            load_LBL();
            tongso();
            setcontrol(false);
            ena_btn(true);
            
		}
        private void loadconbo()
        {
            cbngenghiep.DisplayMember = "ten";
            cbngenghiep.ValueMember = "ma";
            cbngenghiep.DataSource = mDB.get_data("select * from "+m_user+".dmcd ").Tables[0];
            cbngenghiep.SelectedIndex = -1;

            cbchucvu.DisplayMember = "diengiai";
            cbchucvu.ValueMember = "macv";
            cbchucvu.DataSource = mDB.get_data("select * from "+m_user+".dmcv ").Tables[0];
            cbchucvu.SelectedIndex = -1;
        }
        
        public void setcontrol(bool av)
        {            
            groupCT.Enabled=av;
            ckbSoThich.Enabled=av;
            ckbKyNang.Enabled=av;            
            txtSoThich.Enabled = av;
            txtKyNang.Enabled = av;
        }
        private void ena_btn(bool ena)
        {
            btn_thoat.Enabled = ena;
            btn_sua.Enabled = !ena;
            butHuy.Enabled = !ena;
            btnthem.Enabled = ena;
            btn_luu.Enabled = !ena;
            btn_boqua.Enabled =!ena;
        }

        decimal get_id()
        {
            decimal m_id = 0;
            sql = "select max(id)+1 as max_id from " + m_user + ".congviec ";
            DataSet dst = new DataSet();
            try
            {
                dst = mDB.get_data(sql);
                if (dst.Tables[0].Rows[0]["max_id"].ToString() != "")
                {
                    m_id = decimal.Parse(dst.Tables[0].Rows[0]["max_id"].ToString());
                }
                else
                    m_id = 1;
            }
            catch
            {
                m_id = 1;
            }
            return m_id;
        }
		private void menuItem1_Click(object sender, System.EventArgs e)
		{
            
            txtId.Text = get_id().ToString();
			txtTN_CT.Text="";
			txtDN_CT.Text="";
            cbngenghiep.SelectedValue = -1;
            cbchucvu.SelectedValue = -1;			
			txtDV_CT.Text="";
			txtHS_CT.Text="";
			txtTN_CT.Focus();
		}
	
		public string get_llnvmanv
		{
			get
			{
				v_manv=lblMasoNVCT.Text.ToString();				
				return v_manv;
			}
		}
		public string get_llnvmanv1
		{
			get
			{	
				v_ho=lblHoTenNVCT.Text.ToString();
				return v_ho;
			}
		}
		public string get_llnvmanv2
		{
			get
			{				
				v_bophan=lblTenPhongCT.Text.ToString();
				return v_bophan;
			}
		}
		private void butHuy_Click(object sender, System.EventArgs e)
		{
			try
			{
				DataSet ds=new DataSet();
				string ma_nv=lblMasoNVCT.Text;              
                int id= int.Parse(txtId.Text.ToString());
				DialogResult dr = MessageBox.Show(lan.Change_language_MessageText("Đồng ý hủy thông tin này?"),AccessData.Msg,MessageBoxButtons.YesNo);			
				if(dr == DialogResult.Yes) 			
				{	
					try
					{
                        mDB.Execute_data("DELETE  FROM " + m_user + ".congviec WHERE id=" + id + " ");                      
						ds=mDB.f_countNV();
						TSo=ds.Tables[0].Rows[0][0].ToString();
						txtTSo.Text="";
						txtTSo.Text=TSo.ToString();
                        txtTN_CT.Text = "";
                        txtDN_CT.Text = "";
                        cbngenghiep.SelectedValue = -1;
                        cbchucvu.SelectedValue = -1;                        
                        txtDV_CT.Text = "";
                        txtHS_CT.Text = "";
                        load_LBL();
                        ena_btn(true);                      
					}
					catch {}
                    flag = 0;
				}	
			}
			catch{}
         
		}

		private void themnhanvien()
		{	
			try
			{
				insertKN_ST();				
			}
			catch{}
		}

		private void insertKN_ST()
		{
			try
			{
				string ma_nv,ky_nang,so_thich;
				ma_nv=lblMasoNVCT.Text;//lblMasoNVCT.Text;
				ky_nang=txtKyNang.Text;
				so_thich=txtSoThich.Text;
                sql ="UPDATE "+m_user+".llnv SET " +
                " sothich='" + so_thich + "'," +
                " kynang='" + ky_nang + "' " +
                " WHERE mnvmay='" + ma_nv + "'";
				mDB.Execute_data(sql);
			}
			catch{}
		}
        private void ludulieu()
        {
            try
            {                
                string ma_nv, tu_ngay,tu_nam, den_ngay,den_nam, don_vi, he_so, ma_cd, ma_cv
                    ,hs_cv,hs_vk,hs_ud,hs_k;
                int kt_ct = 0;
                ma_nv = lblMasoNVCT.Text;
                {
                    //if (!kiemtra_ct()) return;
                    try
                    {
                        tu_ngay = txtTN_CT.Text.Trim() != "/  /" ? txtTN_CT.Text.Trim() : "";
                        if(txt_tuthang.Text!="" && txt_tunam.Text!="")
                            tu_nam = txt_tuthang.Text.ToString().Trim().PadLeft(2,'0') +"/"+ txt_tunam.Text.ToString();
                        else
                            tu_nam = txt_tuthang.Text.ToString().Trim()+ txt_tunam.Text.ToString();
                        den_ngay = txtDN_CT.Text.Trim() != "/  /" ? txtDN_CT.Text.Trim() : "";
                        if(txt_denthang.Text!=""&& txt_dennam.Text!="")
                            den_nam = txt_denthang.Text.ToString().Trim().PadLeft(2, '0') + "/" + txt_dennam.Text.ToString();
                        else
                            den_nam = txt_denthang.Text.ToString().Trim() + txt_dennam.Text.ToString();
                       
                        ma_cd = cbngenghiep.SelectedValue.ToString();
                        ma_cv = cbchucvu.SelectedValue.ToString();
                        don_vi = txtDV_CT.Text;
                        he_so = (txtHS_CT.Text.Trim() == "") ? "0" : txtHS_CT.Text.Trim();
                        hs_cv = (txt_hscv.Text.Trim() == "") ? "0" : txt_hscv.Text.Trim();
                        hs_k = (txt_hsk.Text.Trim() == "") ? "0" : txt_hsk.Text.Trim();
                        hs_ud = (txt_hsud.Text.Trim() == "") ? "0" : txt_hsud.Text.Trim();
                        hs_vk = (txt_hsvk.Text.Trim()=="") ? "0" : txt_hsvk.Text.Trim();
                        if (chk_dict.Checked)
                        {
                            kt_ct = 1;
                        }
                        decimal m_id = 0;
                        if (flag == 0)
                        {
                            m_id = get_id();
                        }
                        else
                        {
                            if (txtId.Text != "")
                                m_id = decimal.Parse(txtId.Text.ToString());

                        }                                                                        
                        mDB.upd_congviec(m_id, ma_nv, tu_ngay,tu_nam, den_ngay,den_nam, don_vi, he_so, ma_cd, ma_cv,hs_cv,hs_vk,hs_ud,hs_k,ten_nd,kt_ct);
                        ADGSCongTac();
                    }
                    catch { }
                }               
                btn_luu.Focus();
            }            
            catch(Exception ex) 
            {
                MessageBox.Show(ex.ToString());
            }	
        }
       
        public void tongso()
		{
			try
			{
				ds=mDB.f_countNV();
				TSo=ds.Tables[0].Rows[0][0].ToString();
				txtTSo.Text="";
				txtTSo.Text=TSo.ToString();
			}
			catch{}
		}		

		private void ADGSCongTac()
		{
			try
			{
				string ma_nv;
				
				ma_nv=lblMasoNVCT.Text;             
                sql = " select tunam,dennam,to_char(ngayhl,'dd/mm/yyyy') as tungay, to_char(denngay,'dd/mm/yyyy') as denngay";
                sql += " ,cvu.diengiai ,cd.ten,donvi,mucluong,id ,hs_chucvu,tn_vuotkhung,tn_nghe,hs_khac";
                sql += " from " + m_user + ".congviec cv left join " + m_user + ".dmcv cvu on cv.macv=cvu.macv";
                sql += " left join " + m_user + ".dmcd cd on cv.macd=cd.ma where manv='" + ma_nv.Trim() + "' order by ngayhl desc";
				ds=mDB.get_data(sql);
                dgrThanhVienGD.DataSource = ds.Tables[0];               
			}
			catch{}
		}		
		private void loadKN_ST()	
		{
			try
			{
				string ma_nv=lblMasoNVCT.Text;
                sql = "SELECT * FROM " + m_user + ".llnv l," + m_user + ".bophan b  where l.mnvmay ='" + ma_nv + "' and l.madv=b.madv";
				DataSet ads=mDB.get_data(sql);
				DataRow[] r=ads.Tables[0].Select("manv='" + ma_nv+"'");
				txtSoThich.Text=r[0]["sothich"].ToString();				
				txtKyNang.Text=r[0]["kynang"].ToString();

                if (txtSoThich.Text.Trim() != "")
                    ckbSoThich.Checked = true;
                else
                    ckbSoThich.Checked = false;

                if (txtKyNang.Text.Trim() != "")
                    ckbKyNang.Checked = true;
                else
                    ckbKyNang.Checked = false;
			}
			catch{}
		}
		private void load_LBL()
		{						
			ADGSCongTac();
			loadKN_ST();						
		}

        private void dgrThanhVienGD_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            string tunam = "", dennam = "",tungay="",denngay="";
            try
            {
                DataRowView arv = (DataRowView)(dgrThanhVienGD.CurrentRow.DataBoundItem);
                loadconbo();
                txtTN_CT.Text = arv["tungay"].ToString();
                txtDN_CT.Text = arv["denngay"].ToString();                
                cbngenghiep.Text= arv["ten"].ToString();
                cbchucvu.Text = arv["diengiai"].ToString(); 
                txtDV_CT.Text = arv["donvi"].ToString(); 
                txtHS_CT.Text = arv["mucluong"].ToString();
                txtId.Text = arv["id"].ToString();
                tungay = arv["tungay"].ToString();
                denngay = arv["denngay"].ToString();   
                tunam = arv["tunam"].ToString();
                dennam = arv["dennam"].ToString();
               
                if (tungay != "")
                {
                    txt_tuthang.Text = tungay.Substring(3, 2).ToString();
                    txt_tunam.Text = tungay.Substring(6, 4).ToString();
                }
                else
                {
                    txt_tuthang.Text = "";
                    txt_tunam.Text = tunam;

                }
                if (denngay != "" )
                {
                    txt_denthang.Text = denngay.Substring(3, 2).ToString();
                    txt_dennam.Text = denngay.Substring(6, 4).ToString();
                }
                else
                {
                    txt_denthang.Text = "";
                    txt_dennam.Text = dennam;
                }
                if (tunam.Length>4)
                {
                    txt_tuthang.Text = tunam.Substring(0, 2).ToString();
                    txt_tunam.Text = tunam.Substring(3, 4).ToString();
                    txt_denthang.Text = dennam.Substring(0, 2).ToString();
                    txt_dennam.Text = dennam.Substring(3, 4).ToString();
                }
                //else
                //{
                //    txt_tunam.Text = arv["tunam"].ToString();
                //    txt_dennam.Text = arv["dennam"].ToString();
                //    txt_tuthang.Text = "";
                //    txt_denthang.Text = "";
                //}
                txt_hscv.Text = arv["hs_chucvu"].ToString();
                txt_hsvk.Text= arv["tn_vuotkhung"].ToString();
                txt_hsud.Text = arv["tn_nghe"].ToString();
                txt_hsk.Text = arv["hs_khac"].ToString();
 
            }
            catch { };
            ena_btn(false);
            btn_thoat.Enabled = true;
            btn_luu.Enabled = false;
          
        }

        private void hủyToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (txtId.Text != "")
            {
                sql = "delete from " + m_user + ".congviec where id=" + txtId.Text;
                mDB.Execute_data(sql);
                ADGSCongTac();
                txtTN_CT.Text = "";
                    txtDN_CT.Text = "";
                    cbngenghiep.SelectedValue =-1;
                    cbchucvu.SelectedValue = -1; 
                    txtDV_CT.Text = ""; 
                txtHS_CT.Text = "";
                txtId.Text = "";
            }
        }

        private void btnthem_Click(object sender, EventArgs e)
        {
            setcontrol(true);
            txtTN_CT.Text="";
            txtDN_CT.Text="";
            txtDV_CT.Text="";
            txtHS_CT.Text = "";
            txt_tunam.Text = "";
            txt_dennam.Text = "";
            txt_tuthang.Text = "";
            txt_denthang.Text = "";
            txt_hscv.Text = "";
            txt_hsk.Text = "";
            txt_hsud.Text = "";
            txt_hsvk.Text = "";
              loadconbo();
            txtTN_CT.Focus();
            txtId.Text = "";
            ena_btn(false);

            btn_sua.Enabled = false;
            butHuy.Enabled = false;
            btn_thoat.Enabled = true; ;
            flag = 0;
        }
      
  
        private void cbngenghiep_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)              
               SendKeys.Send("{Tab}{F4}");
        }

        private void cbchucvu_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}{F4}");
        }

        private void btnthem_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }      
        private void butHuy_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }       
        private void btn_sua_Click(object sender, EventArgs e)
        {
            if (txtTN_CT.Text.Trim() != "/  /")
            {
                txt_tuthang.Enabled = false;
                txt_tunam.Enabled = false;
            }
            else
            {
                txt_tuthang.Enabled = true;
                txt_tunam.Enabled = true;
            }
            if (txtDN_CT.Text.Trim() != "/  /")
            {
                txt_denthang.Enabled = false;
                txt_dennam.Enabled = false;
            }
            else
            {
                txt_denthang.Enabled = true;
                txt_dennam.Enabled = true;
            }
            setcontrol(true);
            
            ena_btn(false);
            butHuy.Enabled = false;
            btn_sua.Enabled = false;
            btn_thoat.Enabled = true;
            txtTN_CT.Focus();
            flag = 1;
        }

        private void btn_sua_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void btn_luu_Click(object sender, EventArgs e)
        {
            try
            {
                themnhanvien();
                tongso();
                setcontrol(false);
                ena_btn(true);
                btnthem.Enabled = true;
                btn_thoat.Enabled = true;
                btn_luu.Focus();
                ludulieu();
                flag = 0;
            }
            catch { }
        }

        private void btn_thoat_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void frmCongTac_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Alt && e.KeyCode == Keys.T)
            {
                btnthem_Click(null, null);
            }
            if (e.Alt && e.KeyCode == Keys.S)
            {
                btn_sua_Click(null, null);
            }
            if (e.Alt && e.KeyCode == Keys.H)
            {
                butHuy_Click(null, null);
            }
            if (e.Alt && e.KeyCode == Keys.L)
            {
                btn_luu_Click(null, null);
            }
            if (e.Alt && e.KeyCode == Keys.K)
            {
                btn_thoat_Click(null, null);
            }
        }

        private void btn_thoat_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void btn_luu_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                btn_luu.Focus();
        }

        private void btn_boqua_Click(object sender, EventArgs e)
        {
            cbngenghiep.SelectedIndex = -1;
            cbchucvu.SelectedIndex = -1;
            
            setcontrol(false);
            ena_btn(true);
           
            flag = 0;
        }

        private void cbngenghiep_Validated(object sender, EventArgs e)
        {
            if (cbngenghiep.SelectedIndex == -1)
            {
                MessageBox.Show(lan.Change_language_MessageText("Bạn phải chọn nghề nghiệp"), AccessData.Msg);

                setcontrol(true);
                cbngenghiep.Focus();
            }
        }

        private void cbchucvu_Validated(object sender, EventArgs e)
        {
            if (cbchucvu.SelectedIndex == -1)
            {
                MessageBox.Show(lan.Change_language_MessageText("Bạn phải chọn chức vụ"),AccessData.Msg);

                setcontrol(true);
                cbchucvu.Focus();
            }          
        }

        private void txtDV_CT_Validated(object sender, EventArgs e)
        {
            if (txtDV_CT.Text == "")
            {
                MessageBox.Show(lan.Change_language_MessageText("Yêu cầu nhập đơn vị"), AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Warning);

                setcontrol(true);
                txtDV_CT.Focus();
               
            }
        }

        private void txt_tunam_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_dennam_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}{f4}");
        }

        private void txt_tunam_Validated(object sender, EventArgs e)
        {
            if (txtTN_CT.Text.Trim() == "/  /" && txt_tunam.Text == "")
            {
                MessageBox.Show(lan.Change_language_MessageText("Yêu cầu Nhập từ ngày công tác hoặc năm công tác"), AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                txtTN_CT.Focus();
            }
        }

        private void txt_dennam_Validated(object sender, EventArgs e)
        {
            //if (txtDN_CT.Text.Trim() == "/  /" && txt_dennam.Text == "")
            /*if (txtDN_CT.Text.Trim() == "/  /" && txt_dennam.Text == "")
            {
                MessageBox.Show(lan.Change_language_MessageText("Yêu cầu Nhập công tác đến ngày hoặc năm công tác"), AccessData.Msg, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                txtDN_CT.Focus();
            }*/
        }

        private void txt_tuthang_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_denthang_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_hsvk_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_hsud_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_hscv_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                SendKeys.Send("{Tab}");
        }

        private void txt_hsk_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                btn_luu.Focus();
        }

        private void txt_hsvk_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }

        private void txt_hsud_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }

        private void txt_hscv_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }

        private void txt_hsk_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8 || e.KeyChar == '.')
                e.Handled = false;
        }

        private void txt_tuthang_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8)
                e.Handled = false;
        }

        private void txt_tunam_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8)
                e.Handled = false;
        }

        private void txt_denthang_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8)
                e.Handled = false;
        }

        private void txt_dennam_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!IsNumeric(e.KeyChar.ToString()))
                e.Handled = true;
            if (e.KeyChar == 8)
                e.Handled = false;
        }

        private void txtTN_CT_TextChanged(object sender, EventArgs e)
        {
            if (txtTN_CT.Text.Trim() != "/  /")
            {
                txt_tuthang.Enabled = false;
                txt_tunam.Enabled = false;
            }
            else
            {
                txt_tuthang.Enabled = true;
                txt_tunam.Enabled = true;
            }
        }

        private void txtDN_CT_TextChanged(object sender, EventArgs e)
        {
            if (txtDN_CT.Text.Trim() != "/  /")
            {
                txt_denthang.Enabled = false;
                txt_dennam.Enabled = false;
            }
            else
            {
                txt_denthang.Enabled = true;
                txt_dennam.Enabled = true;
            }
        }
        private void chk_dict_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                btn_luu.Focus();
        }        
	}
}
